﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="Detail.ascx.vb" Inherits="FrontEnd_Control_Product_Detail" %>
<%@ Register Assembly="HighslideImage" Namespace="Encosia" TagPrefix="encosia" %>
<script type="text/javascript">
    function ajaxJquery() {
        $(function () {

            // register thickbox after postback
//            var isAsyncPostback = Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();
//            if (isAsyncPostback) {
//                tb_init('a.thickbox, area.thickbox, input.thickbox');

//            }
            $('.ImgThumb').click(function () {
                var CureImgURL = $(this).attr("src").replace("90-60", "");
                $(".RaoVatBigImage a img").each(function () {
                    var ImgURL = $(this).attr("src").replace("320-300", "");
                    if (ImgURL == CureImgURL) {
                        $(this).attr("style", "display:inline");
                    }
                    else {
                        $(this).attr("style", "display:none");
                    }
                });
            });


            $(".btn_detail").click(function () {
                location.href = $(this).parent().parent().find("a").attr("href");
                return false;
            });
            $(".thumb_imgshopproduct").click(function () {
                location.href = $(this).parent().find("a").attr("href");
                return false;
            });

        });
    }    

</script>

<asp:UpdatePanel ID="uplProduct" runat="server">
    <ContentTemplate>

<encosia:HighslideManager ID="HighslideManager1" runat="server" OutlineType="RoundedWhite" />

<div class="col-center">
    <div class="bgcontent_porletinfo">

    <div class="bgtitle_porletright_view">
        <div class="texttitle_porletright_view">
            <h2>
                <asp:HyperLink ID="hplCate" runat="server"></asp:HyperLink></h2>
        </div>
    </div>

    <div class="box_porletright">

            <div class="product_detail_left">

            
                <div class="RaoVatBigImage">
                     <asp:Repeater ID="rptBigBanner" runat="server">
                        <ItemTemplate>
                                <encosia:HighslideImage ID="HighslideImage1" runat="server" Caption="" ImageUrl="" FullImageUrl="" />
                        </ItemTemplate>
                     </asp:Repeater>
                </div>
                <div class="Break"></div>
                <div class="RaoVatImageThumb">
                    <asp:Repeater ID="rptImageThumb" runat="server">
                        <ItemTemplate>
                            <span>
                                <asp:Image ID="imgThumb" runat="server" CssClass="ImgThumb" />
                            </span>
                        </ItemTemplate>
                    </asp:Repeater>
    
                </div>
        
            
           </div>
           
            
            <!-- info sp -->
            <div class="product_detail_right">
                <div class="noi-bac-box">
                <h1 class="title-product"><asp:Literal ID="ltrTitle" runat="server"></asp:Literal></h1>
                
                <div class="code_productview">
                    <span>Mã hàng:</span>
                    <asp:Literal ID="ltrCode" runat="server"></asp:Literal></div>
                <div class="price_productview">
                    Giá: <asp:Label ID="ltrPrice" runat="server" CssClass="SellPrice"></asp:Label>
                    <asp:Label ID="lblOriginalPrice" runat="server" CssClass="SellOff"></asp:Label>
                </div>
                <div>
                    Tình trạng: <asp:Label ID="ltrTinhTrang" runat="server"></asp:Label>
                </div>
                <p style="height:45px">
                    <asp:Button ID="btnAddCart" CssClass="button cart" runat="server" Text="Giỏ hàng" />
                </p>
                <div>
                    Chi tiết:
                </div><asp:Literal ID="ltrThongTinChung" runat="server"></asp:Literal>
                    
                  </div>
            </div>
            <!-- end info sp -->

            
                	
                    
             
        </div>
        <!-- descrip view sanpham -->
        
           

 
            
                            

       
        <!-- end descrip view san pham -->
    </div>
    



<div style="display: none">
    <asp:HiddenField ID="hidProductID" Value="0" runat="server" />
</div>








    </div>

<!-- end row main -->
<div class="box_porletright">
<div class="categories_title_right">
    <h2>Sản phẩm cùng loại</h2>
</div>
            <ul class="list-product">
            <asp:Repeater ID="rptProduct" runat="server">
                    <ItemTemplate>
                    <li>
                       <asp:HyperLink id="hplTitleImage" runat="server">
                      <div class="divImg">
                         <h4><asp:Image ID="img" border="0"  align="absmiddle" runat="server" /></h4>
                      </div>
                      <h1><asp:HyperLink ID="hplTitle" runat="server" CssClass="title_product"></asp:HyperLink></h1>
                      <div class="divPrice">Giá: <span><asp:Literal ID="ltrPrice" runat="server"></asp:Literal>đ</span>  
                      <asp:Literal ID="ltrSaleOff" runat="server"></asp:Literal> </div>
                      </asp:HyperLink> 
                     </li>
                        
                    </ItemTemplate>
                </asp:Repeater>     
                                                          
               </ul>
                             
             <!--phan trang-->
            <div id="results_resultsNavigationDiv" class="pagination" runat="server">
                <ul>
                    <asp:LinkButton ID="lnkFirst" runat="server"><<</asp:LinkButton>
                    <asp:Repeater ID="rptPage" runat="server">
                        <ItemTemplate>
                            <li><asp:LinkButton ID="lnkTitle" runat="server" OnClick="lnkTitle_Click"></asp:LinkButton></li> 
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:LinkButton ID="lnkLast" runat="server">>></asp:LinkButton>
                </ul>   
            </div>
            <asp:HiddenField ID="hidCount" Value="0" runat="server" />
            <asp:HiddenField ID="hidIndex_page" Value="0" runat="server" />
            <asp:HiddenField ID="hidCur_Page" Value="1" runat="server" />
            <asp:HiddenField ID="hidStoreId" Value="0" runat="server" />
            <asp:HiddenField ID="hidCateId" Value="0" runat="server" />
                            

                                          
            </div>
            
    </div>

</ContentTemplate>
</asp:UpdatePanel>